<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:68:"D:\www\7.com\public/../application/admin\view\xshop\index\index.html";i:1588217084;s:55:"D:\www\7.com\application\admin\view\layout\default.html";i:1583049507;s:52:"D:\www\7.com\application\admin\view\common\meta.html";i:1583049507;s:54:"D:\www\7.com\application\admin\view\common\script.html";i:1583049507;}*/ ?>
<!DOCTYPE html>
<html lang="<?php echo $config['language']; ?>">
    <head>
        <meta charset="utf-8">
<title><?php echo (isset($title) && ($title !== '')?$title:''); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<meta name="renderer" content="webkit">

<link rel="shortcut icon" href="/assets/img/favicon.ico" />
<!-- Loading Bootstrap -->
<link href="/assets/css/backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.css?v=<?php echo \think\Config::get('site.version'); ?>" rel="stylesheet">

<!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
<!--[if lt IE 9]>
  <script src="/assets/js/html5shiv.js"></script>
  <script src="/assets/js/respond.min.js"></script>
<![endif]-->
<script type="text/javascript">
    var require = {
        config:  <?php echo json_encode($config); ?>
    };
</script>
    </head>

    <body class="inside-header inside-aside <?php echo defined('IS_DIALOG') && IS_DIALOG ? 'is-dialog' : ''; ?>">
        <div id="main" role="main">
            <div class="tab-content tab-addtabs">
                <div id="content">
                    <div class="row">
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                            <section class="content-header hide">
                                <h1>
                                    <?php echo __('Dashboard'); ?>
                                    <small><?php echo __('Control panel'); ?></small>
                                </h1>
                            </section>
                            <?php if(!IS_DIALOG && !\think\Config::get('fastadmin.multiplenav')): ?>
                            <!-- RIBBON -->
                            <div id="ribbon">
                                <ol class="breadcrumb pull-left">
                                    <li><a href="dashboard" class="addtabsit"><i class="fa fa-dashboard"></i> <?php echo __('Dashboard'); ?></a></li>
                                </ol>
                                <ol class="breadcrumb pull-right">
                                    <?php foreach($breadcrumb as $vo): ?>
                                    <li><a href="javascript:;" data-url="<?php echo $vo['url']; ?>"><?php echo $vo['title']; ?></a></li>
                                    <?php endforeach; ?>
                                </ol>
                            </div>
                            <!-- END RIBBON -->
                            <?php endif; ?>
                            <div class="content">
                                <style>
    ul,li {
    }
    .main {
        background: #fff;
    }
    a, a:hover {
        color: #333;
    }
    .panel-info {
        padding: 10px 0;
        background: #fff;
    }
    .panel-info>a{
        text-align: center;
        border-right: 1px solid #ddd;
    }
    .panel-info>a p {
        font-size: 13px;
        font-weight: 700;
        color: rgb(134, 129, 129);
    }
    .panel-info>a p:nth-child(1) {
        margin-top: 10px;
    }
    select.form-control {
        padding: 6px 18px;
    }

    #echart {
        margin: 20px;
    }
    .panel-info:after {
        clear: both;
    }
    .clearfix {
        clear: both;
    }

    .products-money,.products-number {
        padding: 20px;
    }

    .products-money p,.products-number p {
        font-size: 15px;
        font-weight: 700;
    }

    .products-money li,.products-number li {
        margin: 5px 0;
    }

    .products-money a, .products-number a {
        width: 100%;
        display: block;
    }

    .products-money a span:last-child, .products-number a span:last-child {
        float: right;
    }
</style>
<script>
var Orderdata = <?php echo json_encode($orderData, true); ?>
</script>
<div class="main">
    <div class="row">
        <form id="index-form" class="navbar-form" role="form" method="GET" action="">
            <select name="type" id="type" class="form-control">
                <option value="0">销售订单比数</option>
                <option value="1">销售订单金额</option>
            </select>
            <input id="c-start_time" placeholder="开始时间" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="start_time" type="text" value="<?php echo $start_time; ?>">
            <input id="c-end_time" placeholder="结束时间" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm" data-use-current="true" name="end_time" type="text" value="<?php echo $end_time; ?>">
            <button type="submit" class="btn btn-primary">查询</button>
            <a href="javascript:location.reload()" class="btn btn-primary">重新载入</a>
        </form>
    </div>
    <div class="panel-info">
        <a class="col-md-3 col-xs-3 col-md-3 btn-dialog" data-area='["100%", "100%"]' href="xshop/order/index?is_pay=1" title="查看订单">
            <p class="paied"><?php echo $totalInfo['order_paied']['count']; ?> (￥<?php echo (isset($totalInfo['order_paied']['order_price']) && ($totalInfo['order_paied']['order_price'] !== '')?$totalInfo['order_paied']['order_price']:'0'); ?>)</p>
            <p class="text">已支付</p>
        </a>
        <a class="col-md-3 col-xs-3 col-md-3 btn-dialog" data-area='["100%", "100%"]' href="xshop/order/index?is_pay=0" title="查看订单">
            <p class="wait_pay"><?php echo $totalInfo['order_wait_pay']['count']; ?> (￥<?php echo (isset($totalInfo['order_wait_pay']['order_price']) && ($totalInfo['order_wait_pay']['order_price'] !== '')?$totalInfo['order_wait_pay']['order_price']:'0'); ?>)</p>
            <p class="text">未支付</p>
        </a>
        <a class="col-md-3 col-xs-3 col-md-3 btn-dialog" data-area='["100%", "100%"]' href="xshop/order/index?is_delivery=1" title="查看订单">
            <p class="shipped"><?php echo $totalInfo['order_shipped']['count']; ?> (￥<?php echo (isset($totalInfo['order_shipped']['order_price']) && ($totalInfo['order_shipped']['order_price'] !== '')?$totalInfo['order_shipped']['order_price']:'0'); ?>)</p>
            <p>已发货</p>
        </a>
        <a class="col-md-3 col-xs-3 col-md-3 btn-dialog" data-area='["100%", "100%"]' href="xshop/order/index?is_pay=1&is_delivery=0&status=1" title="查看订单">
            <p class="wait_ship"><?php echo $totalInfo['order_wait_ship']['count']; ?> (￥<?php echo (isset($totalInfo['order_wait_ship']['order_price']) && ($totalInfo['order_wait_ship']['order_price'] !== '')?$totalInfo['order_wait_ship']['order_price']:'0'); ?>)</p>
            <p>待发货</p>
        </a>
        <div class="clearfix"></div>
    </div>
    <div style="width:100%;height: 300px;" id="echart"></div>
    <div>
        <div class="col-md-6 products-money">
            <p>商品销售额排行</p>
            <ol class="">
                <?php foreach($productsMoney as $item): ?>
                <li>
                    <a>
                        <span><?php echo $item['title']; ?></span>
                        <span>￥<?php echo $item['product_price']; ?></span> 
                    </a>
                </li>
                <?php endforeach; ?>
            </ol>
        </div>
        <div class="col-md-6 products-number">
            <p>商品销售量排行</p>
            <ol class="">
                <?php foreach($productsNumber as $item): ?>
                <li>
                    <a>
                        <span><?php echo $item['title']; ?></span>
                        <span><?php echo $item['quantity']; ?></span>
                    </a>
                </li>
                <?php endforeach; ?>
            </ol>
        </div>
        <div class="clearfix"></div>
    </div>
</div>

                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="/assets/js/require<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js" data-main="/assets/js/require-backend<?php echo \think\Config::get('app_debug')?'':'.min'; ?>.js?v=<?php echo htmlentities($site['version']); ?>"></script>
    </body>
</html>